﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/NestedMasterPage1.master" Inherits="System.Web.Mvc.ViewPage<DrugStore.Helper.PaginateList<DrugStore.Models.News>>" %>

<asp:Content ID="main" ContentPlaceHolderID="mainContent" runat="server">
    <div class="main-header">       
         <div style="font-size:30px;font-style:italic;font-weight:bold;margin-top:22px;margin-left:110px;color:#4B0804;">
         Tin tức
         </div>
    </div>    
    <div style="width:514px;padding-left:7px;">
        <img src="../../Content/images/trad_111.gif" />
    </div>    
    <div class="border-main">
    <%foreach(DrugStore.Models.News n in Model) 
      {%>            
        <div class="feat_prod_box">             
            	<div class="prod_img"><a href="#" target="_blank"><img src="../../Content/newImages/<%:n.ImagePath %>" alt="errors" title="Tin tức" border="0"></a></div>                
                <div class="prod_det_box">
                	<div class="box_top"></div> 
                    <div class="box_center">
                        <div class="prod_title">
                        <% if (n.Title.Length >40)
                           {%>
                            <%:n.Title.Substring(0, 37)%>...
                        <% }
                           else { %>
                            <%:n.Title%>
                           <%}%></div>
                        <p class="details">
                            <%=n.Containts %>
                        </p>                        
                            <%: Html.ActionLink("-Chi tiết-","Details", new{id=n.NewId} ,new {@class = "more"})%>
                        <div class="clear"></div>
                    </div>                    
                    <div class="box_bottom"></div>
                </div>    
            <div class="clear"></div>
         </div>
      <%} %>                  
      <div style="margin-left:350px;margin-bottom:25px;position:relative; z-index:100;font-weight:bold;font-style:italic">
           <%if (Model.HasPreviousPage)
             { %>
             <%:Html.RouteLink("Trang trước", "Product", new { page =( Model.PageIndex - 1) }) %>
           <%} %>
           <%if (Model.HasNextPage)
             { %>
             <%:Html.RouteLink("Trang sau", "Product", new { page = (Model.PageIndex + 1) }) %>
           <%} %>
      </div>   
      <div class="clear"></div>
    </div>                      
</asp:Content>
